csanesz Posted October 26, 2006 Posted October 26, 2006 Egy adatbázisból a következõ módon kérdezem le az adatokat: $result=mysql_query("select márka, tipus, célközönség, ár from termékek"); $adatok=mysql_fetch_assoc($result); extract($adatok); Most jön a kérdésem, hogy itt a változókat hogy kapom meg? (Gondolom hogy hülyeség az hogy, $márka, $tipus, $célközönség, $ár) Vagy van olyan intelligens a PHP hogy átalakitja $marka, $tipus,$celkozonseg,$ar nevekre? Elõre is köszi
arpsoft Posted October 26, 2006 Posted October 26, 2006 <?php /* Suppose that $var_array is an array returned from wddx_deserialize */ $size = "large"; $var_array = array("color" => "blue", "size" => "medium", "shape" => "sphere"); extract($var_array, EXTR_PREFIX_SAME, "wddx"); echo "$color, $size, $shape, $wddx_size\n"; ?> http://hu.php.net/manual/en/function.extract.php
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now