
hmida
New User
Nov 12, 2010, 8:05 AM
Post #5 of 7
(4604 views)
|
Re: [Zhris] transform If-then-else statemt to ?: opeator statement
[In reply to]
|
Can't Post
|
|
thanks for the reply, i want to change codes like this: <if condition="$vboptions[tosurl]"> <a href="$vboptions[tosurl]">$vbphrase[terms_of_service]</a> - </if> ... <if condition="$show['deletedpost']"> \n\t\t\t <if condition="$show['managepost']"> \n\t\t\t\t<a href="postings.php?$session[sessionurl]do=managepost&p=$post[postid]"><img src="$stylevar[imgdir_misc]/trashcan.gif" alt="$vbphrase[manage]" border="0" /></a> \n\t\t\t <else /> \n\t\t\t\t<img src="$stylevar[imgdir_misc]/trashcan.gif" alt="$vbphrase[deleted_post]" border="0" /> \n\t\t\t </if> \n\t\t </if> \n\t\t ... to code like this : <tr> ".(($show['quickchooser']) ? (" <td class=\"tfoot\"> <select name=\"styleid\" onchange=\"switch_id(this, 'style')\"> <optgroup label=\"$vbphrase[quick_style_chooser]\"> $quickchooserbits </optgroup> </select> </td> ") : (""))." ".(($show['languagechooser']) ? (" <td class=\"tfoot\"> <select name=\"langid\" onchange=\"switch_id(this, 'lang')\"> <optgroup label=\"$vbphrase[quick_language_chooser]\"> $languagechooserbits </optgroup> </select> </td> ") : (""))." ... i m doing this cause, it's requied in the syntaxe of the program, im writing code for.
|