Actually scratch this. I talked to my boss and the number that I'm looking for isn't necessarily in the same place every time. I need to find a string inside of a string.
I need to look for the numbers 24, 30, 36, 42, 48, 60
PHP Code:
if (how do i calculate this == '24') { echo "You have a 2 ton system."; } else if (how do i calculate this == '30') { echo "You have a 2.5 ton system."; } else if (how do i calculate this == '36') { echo "You have a 3 ton system."; } else if (how do i calculate this == '42') { echo "You have a 3.5 ton system."; } else if (how do i calcualte this == '46') { echo "You have a 4 ton system."; } else if (how do i calculate this == '60') { echo "You have a 5 ton system."; }
This is kinda what I want to do.. only I don't know how to determine if a string contains a certain value.
Example:
Y24 36A15
Y24A15 36
Y 3624A15
No matter where the number is, it will recognize that it is part of the string.
__________________
Please login or register to view this content. Registration is FREE
Coding is just like a woman. If you don't do something exactly right, it complains.
|