seo - can a search engine read a PHP echo in a sites alt tags? -


is practice use php inject text alt or title tags? can search engine read title tag or see code?

this going for

<?php $title = “testing 123" ; ?>  <h2><?php echo $title; ?></h2> <img src="images/test/test01.jpg" alt="<?php echo $title; ?>" title="<?php echo $title; ?>" />  

or better this

<h2><?php echo $title; ?></h2> <img src="images/test/test01.jpg" alt=" testing 123" title=" testing 123" />  

thanks help.

a search engine crawls website user does. send http (usually) request , search page source returned server (your delivered content, in case php's output).

this means search engines never see server side code php, see same user. 2 solutions identical.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -