Jiraiya Posted December 9, 2008 Share Posted December 9, 2008 how would i go about creating something that has two variables "A"/"B" i need A to represent the current amount of cash or something and B to represent the maximum that they can have hers what i mean A/B 100/100 90/100 and i also need to be able to echo it in the form that is shown above if possible Quote Link to comment https://forums.phpfreaks.com/topic/136236-can-someone-point-me-in-the-right-direction/ Share on other sites More sharing options...
JonnoTheDev Posted December 9, 2008 Share Posted December 9, 2008 Dont think you are really explaining fully what you are after but from your post the following is correct: $cashAmount = 10; $cashLimit = 100; print $cashAmount."/".$cashLimit; Quote Link to comment https://forums.phpfreaks.com/topic/136236-can-someone-point-me-in-the-right-direction/#findComment-710665 Share on other sites More sharing options...
Jiraiya Posted December 9, 2008 Author Share Posted December 9, 2008 im sorry let me try and explain it better. Im making a game and im trying to create a health point system. variable A is supposed to be the players current health and variable B is supposed to show the players maximum health that hey can have at there current level Quote Link to comment https://forums.phpfreaks.com/topic/136236-can-someone-point-me-in-the-right-direction/#findComment-710669 Share on other sites More sharing options...
revraz Posted December 9, 2008 Share Posted December 9, 2008 The answer would still be the same, just substitute cash for health. Quote Link to comment https://forums.phpfreaks.com/topic/136236-can-someone-point-me-in-the-right-direction/#findComment-710738 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.