I have this code:
echo ('<div></div>
'.(isset($replay->extra['mode']) ? $replay->extra['mode'] : "n/a").'
<div></div>')
I want to put the this text before the just $replay->extra[‘mode’] : “n/a”).’
M-
so that it will look like this:
M-$replay->extra['mode'] : "n/a").'
to be fully like this:
echo ('<div></div>
'.(isset($replay->extra['mode']) ? M-$replay->extra['mode'] : "n/a").'
<div></div>')
But i keep getting syntax error so what is the correct syntax and way to do it?
Thanks
You need to concatenate the string within the inline
ifstatement by making it a string (enclose in quotes) and using a..You may also have an error with your
<div></div>‘s – unless you are trying to create an empty<div>before and after your string, you likely the following to wrap your output with the<div>tags: