Can I use "if" inside of "array" in php?

  • Thread starter Thread starter HomeAndFamily.biz
  • Start date Start date
H

HomeAndFamily.biz

Guest
How can I do something like this?

$whatever[] = array('align' => 'left',
'text'=>'<a href="somelink>somelink</a><br>' .
if (thing == 'false') '<a href="if_link">'if_link'</a><br>' .
<a href="non_if_link>non_if_linklink</a><br>' .

I would only want the if to apply to the middle line.
 
Back
Top