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

Using the $_GET variable to view certain records
Hello,

First let me explain my problem, I have 2 pages the first page pull a list of Guide ti

Email Processor
I have a few questions so this post will be a larger one! Sorry, but I'm a bit of a PHP newbie so be

Table trouble
i have been reading the forum for a few weeks and decided to join. i like the format and the advice

PHP and SMS
Hi all forum members. I am new here and am unsure what category shoild I post this in.
Moderator

undefined offset help
Hi All,

I kept getting undefined offset PHP notice for a simple for loop. For eg
$va = arr

Coding Critique
I was hoping someone could take a second and look down my code and see if they see any problems with

Require select-option functionality in Module Pool Programming
Hi Gurus,

I am doing a development by Module Pool on Warehouse Management. For that devel

Email with Attachments in PHP
Hi Friends

How to send email in PHP with attachment.
I know simple mail can be sent with

xml
<?php

echo "<h1>XML Articles</h1>";

$home

Unable to display contents in Second Drop Down Box
Hi All,

What I am trying to do is 2 dependent drop down boxes and when user selects su

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