Div handling using PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
php14user
Forum Newbie
Posts: 12
Joined: Tue Apr 08, 2008 11:02 pm

Div handling using PHP

Post by php14user »

Hi,

Can we use PHP to make a particular "Div" visible or invisible by clicking on a link?

Thanks
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: Div handling using PHP

Post by aceconcepts »

You can if you use some css.

Code: Select all

 
if($value==2)
{
   $display="block";
}
else
{
   $display="none";
}
 
  echo'<DIV style="display:'.$display.' ";">';
 
php14user
Forum Newbie
Posts: 12
Joined: Tue Apr 08, 2008 11:02 pm

Re: Div handling using PHP

Post by php14user »

Thanks alot aceconcepts.
Post Reply