PREG_MATCH draw a blank result

Discussion in 'PHP' started by bad_rado, Apr 26, 2010.

  1. #1
    Try to divide English and Bulgarian name and save them in two different fields but are not poluchava.nyakoy have an idea why?

    $sql = mysql_query("SELECT * FROM tablica ORDER by idMovie DESC") or die (mysql_error());
    while($movie = mysql_fetch_assoc($sql))
    {
    echo "<h1>".$movie['title']."</h1>";
    preg_match('#<h1>(.*) / (.*)</h1>#imsU',$html,$title);
    mysql_query("UPDATE tablica SET title='".$title[1]."' , title_bg='".$title[2]."' WHERE idMovie='$movie[idMovie]'") or die (mysql_error());
    }
    PHP:

     
    bad_rado, Apr 26, 2010 IP
  2. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #2
    echo $html;

    I don't see what your trying to match, moreover your description is vague.
     
    danx10, Apr 26, 2010 IP