Finding digits in variable containing text, and IDing them


Posted on 16th Feb 2014 07:03 pm by admin

$romanstock = "http://www.remoteprice.com/data.asp?storeid=123&itemcode=456&type=2";$contentsstock = file_get_contents($romanstock);
The above code, when rendering $contentsstock, renders this:
Quote:var cText = '13' document.write(cText)

Did you know?Explore Trending and Topic pages for more stories like this.
'13' could be 1 or even 189.

I need to get those digits out of there, and then query them, ie;
Line number On/Off | Expand/Contractif ($contentsstock >= "2") { echo "this is 2";}

I think I know how to strip out characters from character 10 (for example) up to character 12, but this quote could be 1, 2 or 3 digits.

Can anyone help me here please?
No comments posted yet

Your Answer:

Login to answer
51 Like 10 Dislike
Previous forums Next forums
Other forums

Expandable Post Code
Hi,

Hope you can help. Which currently I haven't upgraded to connect to a mysql server, so i

upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please t

browse folder only
hi,
is there a way i can browse or get the directory or folder only and not the file?
i just w

Retreiving objects from Sessions
Hi all,

I am getting really frustrated with storing and retreiving objects from a session. Bu

Comparing MySql data and arrays.
I have a mysql table set up like this:
idsubjectbodyuseriddatetimetags1blog subjectblog body111|2

grouping within a foreach?
hello all,

I currently have a list of products spit out from my db via a foreach loop. Right

ECC6 - Single sign-on
We are in the process of upgrading to ECC 6 which will support single sign on with user passwords al

article site help remaining text
Hi all hope you will be fine
I am creating a article site in this site i want to put some text on

Batch Related Pricing
Hi, I need some clarity on the batch related pricing

For example the following are the b

problems with contact forms that are only protected against SQL injections
What could be a potential problem with contact forms that are only protected against SQL injections

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash