zackcez Posted July 21, 2008 Share Posted July 21, 2008 What I'm trying to do is have a variable like this: $skill = Attack; $PlayerXp[$skill] = number_format($row[$skill . "xp"]); I'd like it to add the word xp at the end of the $skill variable without physically changing the variable. Quote Link to comment https://forums.phpfreaks.com/topic/115781-solved-php-variable/ Share on other sites More sharing options...
.josh Posted July 21, 2008 Share Posted July 21, 2008 please do not make multiple threads asking the same thing. Instead, post this in your other thread as clarification to your problem. edit: reopened as you say this is a diff problem... Quote Link to comment https://forums.phpfreaks.com/topic/115781-solved-php-variable/#findComment-595216 Share on other sites More sharing options...
.josh Posted July 21, 2008 Share Posted July 21, 2008 aside from the fact that you didn't put quotes around "Attack" when you assigned it to $skill, that code should work the way you want it. Quote Link to comment https://forums.phpfreaks.com/topic/115781-solved-php-variable/#findComment-595218 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.