Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php]preg_replace()
-Gość_Foxx_*-
post
Post #1





Goście







Po wykonaniu takeji funkcji

  1. <?php
  2. $fg = "IF EXISTS";
  3. $tab = array("IF EXISTS", "CREATE TABLE", "INSERT INTO", "ALTER TABLE ");
  4. $tab2 = array("IF EXISTS $pref", "CREATE TABLE $pref", "INSERT INTO $pref", "ALTER TABLE $pref");
  5. $tmp = preg_replace("%$tab%", $tab2, $fg);
  6. ?>

Dostaje komunikat o takim błędzie
Cytat
Warning: preg_replace(): Parameter mismatch, pattern is a string while replacement in an array. in C:\Apache2\htdocs\alpha\install\test.php on line 3

Dlaczego?
Go to the top of the page
+Quote Post

Posty w temacie
- Gość_Foxx_*   [php]preg_replace()   24.06.2006, 11:07:27
- - Adiasz   Przeciez wszystko jest napisane w komunikacie bled...   24.06.2006, 11:46:27
- - Gość_Foxx_*   Skora tak mówisz CytatWarning: preg_replace(): D...   24.06.2006, 11:58:28
|- - Adiasz   ojojoj kolego ale bledy ktore wyswietla parser trz...   24.06.2006, 12:08:16
- - Gość   Trzeba znać angielski Dzięki   24.06.2006, 12:37:14


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 01:02