heya,
i apologize for this pedestrian of a question, but i have looked in the php docs, searched here, and googled to no avail. I need to pick up a more in-depth book, but it is 1 am and i am trapped here at work, so forgive what may be a elementary question.
I really like hwo i can cut down on the size of mycode using the ternary format. What is the syntax in a ternary statement for assigning multple variables? i.e. making this:
if($whatever=="x"){
$blah=1;
$b_lah=2;
$bl_ah=3;
}
else{
$blah=3;
$b_lah=2;
$bl_ah=1;
}
into this:
$whatever=="x" ? (assign multiple blahs here) : (or their couterpart assignments here);
I suspect this is possible, but I keep getting parse errors no matter how i try. Again, forgive the elementary nature of the question.