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

contact form - output to page and email
I have the following in my controller:

$message['name'] = htmlentities(strip_tags(trim($_POST

Time-based image rotation script
I'm trying to write a PHP script that rotates an image based on what time of day it is. I want the

Operator precedence assistance.
I did a quick Google search and couldn't quite find the answer I wanted in terms I could understand,

rand() function
just a general question guys a girls, is the rand() function 100% random or is it based on time?

Thread in PHP
Thread in PHP
Some basic use and basic code for thread in php
This is my question?

Streaming local file from PHP while it’s been written to by a CURL process
I am creating a simple Proxy server for my website. Why I am not using mod_proxy and mod_cache is a

date function help
i need help with date function

Code: [Select]<!DOCTYPE HTML PUBLIC "-//W3C//DTD H

Problem with umlauts and UTF-8
Hello every1,

I'm creating my own little CMS at the moment and got some problems with the cha

mod_rewrite.c on windows ??
why it's not working on windows while it's working on other hosts???

this is the code i got

Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne

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