So here's the array:
array(
'tag' => 'img',
'type' => 'unparsed_content',
'content' => '<img src="$1" alt="" border="0" />',
I've like to add an argument like:
<img src="$1" IF(SOMETHING) DO SOMETHING ELSE DO SOMETHING alt="" border="0" />',
How do I add a PHP argument like that?
You can't just blindly do that. We need *specifics* to help you with this because otherwise it's going to mess up (guaranteed, owing to inline ternary vs concatenation operator precedence)
Lainaus käyttäjältä: Arantor - lokakuu 17, 2013, 04:41:22 IP
You can't just blindly do that. We need *specifics* to help you with this because otherwise it's going to mess up (guaranteed, owing to inline ternary vs concatenation operator precedence)
I've made backups in case it breaks. Any suggestions? I really want to learn this.
It's nothing specific, I just took that code randomly from subs.php...
My suggestion is that I NEED you to be specific because you're going to be doing things like:
'content' => '<img src="$1"' . (some expression ? first value : second value) . ' alt="" border="0" />',
Great, I learned something new today. TY