What causes the HTML to look differently based on the way the PHP is placed? -


here photo examples illustrate mean.

edit:

echo '     <input type="text" name="city" class="" placeholder="city" disabled="true"/>                     '.displaystateselect('state', null).'     <input type="text" name="zip" class="" placeholder="zip" disabled="true" />'; 

or

echo '<input type="text" name="city" class="" placeholder="city" disabled="true" />';  displaystateselect('state', null);  echo '<input type="text" name="zip" class="" placeholder="zip" disabled="true" />         </div> 

when calling function during echo statement: code - inline photo - inline

breaking apart:

code - broken apart photo - broken apart

-- aren't these same? causes display order change? execute functions response first echo rest (as appears?).

side question, bad practice call inline echo functions? =\

your function displaystateselect('state', null) writes <select> element output buffer via echo or other method instead of using return allow use first method.

ie

function displaystateselect($state,$something){     echo '<select><option>1</option><option>2</option></select>'; } 

vs

function displaystateselect($state,$something){     return '<select><option>1</option><option>2</option></select>'; } 

Comments

Popular posts from this blog

php - isset function not working properly -

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -