bgbs Posted September 15, 2009 Share Posted September 15, 2009 I'm trying to figure out how I would put css code in echo statement. When I tried echo "<div>Office Phone: $vuser->phone_office $vuser->phone_ext<img src='images/icon_verified.gif' alt='verified logo' width='63' height='16'></div>"; I got syntax error. Original code below if($office_phone_verified == "Yes") { echo "Office Phone: $vuser->phone_office $vuser->phone_ext<img src='images/icon_verified.gif' alt='verified logo' width='63' height='16'>"; } Anybody know? Quote Link to comment https://forums.phpfreaks.com/topic/174363-how-do-i-wrap-css-around-echo-code/ Share on other sites More sharing options...
mikesta707 Posted September 15, 2009 Share Posted September 15, 2009 echo "<div>Office Phone: $vuser->phone_office $vuser->phone_ext<img src='images/icon_verified.gif' alt='verified logo' width='63' height='16'></div>"; what syntax error did you get? this code should echo perfectly fine... Quote Link to comment https://forums.phpfreaks.com/topic/174363-how-do-i-wrap-css-around-echo-code/#findComment-919086 Share on other sites More sharing options...
bgbs Posted September 15, 2009 Author Share Posted September 15, 2009 I guess it was my mistake because in <div> element I shouldn't have used quotes when specifying class but apostrophes Quote Link to comment https://forums.phpfreaks.com/topic/174363-how-do-i-wrap-css-around-echo-code/#findComment-919131 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.