Menu
i have this code how can i call $result in the while looping who’s in other function ?
[QUOTE]
<?php
class project0 {
public function mysql_connection() {
$host = ‘localhost’;
$user = ‘root’;
$password = ”;
$db = ‘om’;
$dbtbl = ‘omtbl’;
$connetion = mysql_connect($host,$user,$password);
$select = mysql_select_db($db);
[COLOR=”red”] $result[/COLOR] = mysql_query(“SELECT * FROM $dbtbl”);
}
public function show_my_users(){
while ($row = mysql_fetch_array([COLOR=”Red”]HOW CAN I CALL $result HERE ?[/COLOR])) {
print $row[‘id’];
}
}
}
?>