Click to See Complete Forum and Search --> : come out of text to do an if statement


k0r54
06-06-2006, 05:37 AM
Hi,

I have always worked around it but is it possible to whlist in speech marks to come out of them to do an if statement: -

I.e

$IT = "blah blah blah" . if ($it_q == 1) { "yes" } . " blah blah blah";

I think you get what i mean. This errors out.

Thanks
k0r54

bathurst_guy
06-06-2006, 06:09 AM
$IT = "blah blah blah";
if ($it_q == 1)
$IT .= "yes"
$IT .= " blah blah blah";

k0r54
06-06-2006, 06:17 AM
Yeah that was the way i usually do it i just thought it could be done slightly easier.

Thanks though
k0r54