Question by Jack Smith: Can somebody please write me this Simple PHP script?
Can Someone write a simple php script that will show the ages of the family members if George is 3 years older than Alice and Paul is 22 years younger than Alice. Use the following ages for George : 42 and 21. Output the result for each of the 2 ages.
Answer by Seco
This is a remarkably easy assignment for you, I have added a little more than was asked so I advise you actually read it and understand it fully before submitting it.
$ a = ($ g-3)<0 ? $ ub : $ g-3; $ p = ($ g-25)<0 ? $ ub : $ g-25; $ g = $ g<0 ? $ ub : $ g; echo "
George: $ g
echo “Alice: $ a
echo “Paul: $ p \n”;
What do you think? Answer below!
There are no revisions for this post.