![]() |
| ||
| php within echo statement / hide element hi all, I am wondering if someone could give me a quick hand with some php im trying to edit in Wordpress. Heres the original peice I am trying to edit: <div class='dateauthor'> What I want to do is when "the_author" equals "admin" for the div to be hidden or deleted. I have added this to make sure that it can find admin <?php if ($author=="admin"){echo "hello24241";} ?>and edit here...<?php $author=the_author() ?> My question I guess would be is there a statement that would be able to hide/delete the div? Or should I be re-writing this code, like this... <?php $author = the_author(); ?> Thanks for any help, and if you need me to be a little more clear just ask, tian |
| ||
| Re: php within echo statement / hide element I apologize as soon as I sent this I remembered I started the thread in wrong are, not sure how to move this but if a mod could delete this ill make new post in php. Thanks :$ |
| ||
| Re: php within echo statement / hide element You are getting an error in the else line because you are trying to use VB type if else in PHP. But PHP is originally based on C language so that if else will surely return an error to learn more about the if else statement in PHP Follow this link: http://www.w3schools.com/php/php_if_else.asp |
| All times are GMT -4. The time now is 6:32 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC