html - Echo php using CSS Content: property -


i need echo php using css content: property.

php:

<?php $links = "<a href=\"https://www.facebook.com\" target=\"_blank\"><img src=\"images/fb.png\"     width=\"16\" height=\"16\"></a> <a href=\"https://twitter.com\" target=\"_blank\"><img     src=\"images/twitter.png\" width=\"16\" height=\"16\"></a>"; ?> 

css:

body li:nth-child(2):after{  content: "<?php echo "$links"; ?>"; color:#fff; } 

html:

<ul> <li>date</li> <li>time</li> </ul> 

desired output:

date  time  fb  tw 

try like

css: body li:nth-child(2):after{      content: "<?php echo $links; ?>";     color:#fff; } 

you can try like

content: <?php echo $links; ?>; 

assuming css in same file php


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -