PHP equivalent to jQuery html() or text() -


im trying print result of php function specific html id or class

the php function called button input

jquery code:

function myfunction() { $answer = 'random text <b>' + $radomvar +'more random'; $('#resultline').html($answer); } 

is there equivalent

$('#resultline').html($answer);      

in php?

what you're asking doesn't make sense. can can embed php code alongside html code , processed server before http response sent client.

therefore, why not like:

<span id="resultline"><?php echo myfunction(); ?></span> 

where myfunction php function returns string want embed?


Comments

Popular posts from this blog

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -