I have a preg_match command ;
<?php
$content = "<span class='hotels'><div id='general_parcel_id'></div></span>";
$wanted=preg_match ('/<span class=\'hotels\'>(.*?)<\/span>/', $content, $result);
$resultant = $result[1];
?>
Note : <div id='general_parcel_id'></div>
prints an id for each product on the page.
and finally I want to use this $resultant variable, for a database connection.
Ex.
$dbase = mysql_fetch_array(mysql_query("select * from hotex WHERE parcel_id = '$resultant'"));
but this is not possible. Write the result as variable once. Only once
Thank you in advance ...