![]() |
| |||||||
| PHP Forum PHP Forum. PHP Programming questions and answers here. |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
| |||
| Having problems with a php conditional statement?
Hi I have been trying to use this code to load a module with certain contents if the browser is ie6 or lower and load other contents if the browser is anything but ie 6 or below. I cannot get this code to function correctly, it always shows the second content whether the browser is ie 6 or not. I have also tryed other browsers and code variations and nothing has helped me yet. I am posting the code below can anybody tell me what I am doing wrong? Thank you. <?php $ua = get_browser (); if ( ( $ua->browser == "IE" ) && ( $ua->version <= 6.0 ) ) {?> <div>first content</div> <?php } else { ?> <div>second content</div> <?php }?> Please help I tried to post this before but only got a "what? seriously" response. Please tell me what I am doing wrong im trying to get better at this. Thank you |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how do I write an if statement to check if mysql is empty? | project96gsr | Mysql Forum | 2 | 07-16-2008 04:13 PM |
| Is the below statement true ? I read it on Wikipedia.? | Zach | Wikipedia Forum | 8 | 07-12-2008 01:09 AM |
| What am I doing wrong with this PHP mySQL INSERT statement? I can't seem to get | Michael Y | Mysql Forum | 0 | 06-20-2008 12:22 AM |
| need in sql statement in mysql? | benaya p | Mysql Forum | 0 | 06-06-2008 01:24 AM |
| Can anybody help me on this C++ program using switch case statement. And also... | joycee | C++ Forum | 0 | 06-04-2008 02:49 AM |