Jump to content

using a variable as a %


chaosxkitten

Recommended Posts

If you view source what you do you get?  Also you ending the line after the "%;"

 

Maybe try this...

echo "div {
width: ".$p."% 
}";

 

I know that the "%" is often use as the MOD math function.  I'm wondering if that had something to do with it.  Try out my code and let me know what happens.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.