Hi,
I have been trying to complete a multidimensional array. It currently dumps the whole array but it wont echo individual rows which are the last 3 lines.
Can anyone please advise how I can echo just single rows instead of the whole array?
<?php
if(isset($_GET['skill'])) {
$skills = $_GET['skill'];
$sql = "SELECT * FROM users WHERE skill1 = '$skills'";
$res = mysql_query($sql) or die(mysql_error());
//This will return one row, is that what you want?
// $row = mysql_fetch_assoc($res);
// $num_rows = mysql_num_rows($res);
//in your job post it sounds like the query would retutn multiple rows.
//this will loop the resut of the query.
while ($row = mysql_fetch_assoc($res)) {
var_dump($row);
echo $firstname;
}
}
?>
<?php echo (!empty($row['skill1'])) ? $row['skill1'] : ''; ?>
<?php echo $skill1; ?>
<?php echo $skill; ?>