Jump to content

if else


far2slow

Recommended Posts

$gonline = $json['response'][0]['user']['is_online'];

so $gonline can be 0 or 1 

i know i can do it like

if ($gonline=="0")
echo "Off line";
else echo "Online";

 

but i want to echo the result later on in the script in the line

<img src="', $member['online']['image_href'], '" alt="', $member['online']['link'], '" /> <span class="smalltext">', $member['link'],  ' ', $gonline,  '</span><br />';

Link to comment
https://forums.phpfreaks.com/topic/242460-if-else/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.