Jump to content

variable problem


MDanz

Recommended Posts

i'm trying to echo a variable for padding. $finalposition is an integer.

 

echo "style='padding-top:$finalpositionpx"; 

 

i got it working when i put php tags around the variable but that messes up my whole code.  it's because of the px.  i think php is reading the variable as $finalpositionpx rather than $finalposition.

 

what can i do?

Link to comment
https://forums.phpfreaks.com/topic/202467-variable-problem/
Share on other sites

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.