while($testing = mysqli_fetch_array($sendPasswordQuery)){
echo "'$testing['name']'";
}
Hi, I know that the second line is wrong, but how would I print the name column. Thanks in advance.
while($testing = mysqli_fetch_array($sendPasswordQuery)){
echo "'$testing['name']'";
}
Hi, I know that the second line is wrong, but how would I print the name column. Thanks in advance.
Your second line needs to be formatted as one of the following:
echo $testing['name']; // will output Name directly
echo "'{$testing['name']}'"; // will output 'Name' inside a string
echo "'$testing[name]'"; // will output 'Name' in a string,
// however the second example is better practice.
If you are just echoing the variable and not adding any extra text to it, just use this:
echo $testing['name'];
Otherwise, I'd suggest the following:
echo "Lorem ipsum {$testing['name']} sit amet.";
That will output: Lorem ipsum Name sit amet.