Page 1 of 1

Div handling using PHP

Posted: Wed Apr 09, 2008 9:39 am
by php14user
Hi,

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

Thanks

Re: Div handling using PHP

Posted: Wed Apr 09, 2008 9:43 am
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.' ";">';
 

Re: Div handling using PHP

Posted: Wed Apr 09, 2008 9:53 am
by php14user
Thanks alot aceconcepts.