עדיין לא עובד...
שמע תיקנתי קצת תקוד...
עכשי זה עושה מה שצריך לעשות אבל רק על השורה הראשנה שהוא קורא מהטבלה ועל כל השאר הוא לא עושה...
PHP קוד:
<?php
$dashim = "SELECT `id`, `name`, `dash` FROM `dashim` ORDER BY `id` DESC";
$result_dashim = mysql_query($dashim);
$replaces = "SELECT `w2replace`, `replacew` FROM `replaces`";
$result_replaces = mysql_query($replaces);
while($dash = mysql_fetch_array($result_dashim))
{ while($replace = mysql_fetch_array($result_replaces))
{
$w2replace = $replace['w2replace'];
$replacew = $replace['replacew'];
$dash['dash'] = str_replace($w2replace, $replacew, $dash['dash']);
}
echo("<b>".$dash['name'].":</b> ".$dash['dash']."<br />\n");
}
?>
ניראה לי שעליתי על באג- אם עושים לולאה בתוך לולאה אז הלולאה הפנימית מתבצעת פעם אחת...