preg_match logical error


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

Code: <?php
$s = file_get_contents("page.html");
preg_match('/<div class="brown_box main_ge_page vertically_spaced"><div class="subsectionHeader">(.*)</div>/', $s, $m);
echo $m[1];
?>
page.html content
Code: <div class="brown_box main_ge_page vertically_spaced">
<div class="subsectionHeader">
Works
</div>
How come it doesnt get the word, "Works"

No comments posted yet

Your Answer:

Login to answer
129 Like 32 Dislike
Previous forums Next forums
Other forums

PHP Login
Hey!
I got this shopcart code online, am trying to modify it but am getting an error when i try a

PHP mail() rejected by SMTP
I'm currently working on a newsletter application which is installed on a windows 2003 server runnin

Weird Problem with curl while sending data
I am facing a weird problem with sending data to a site via curl.

If i send the value by this

Inserting multiple records from single form
I've found a number of threads that deal with this issue, but I'm new to php and coding language so

word wrap in emails help needed
Hello, I understand how wordwrap works in php and have used it well before. However when I used wor

help me fix these syntax errors...
I keep getting multiple syntax errors on this script like this one:

Parse error: syntax error

Why is this query failing?
Why is this not working?
$query = "SELECT * FROM `users` WHERE `userid` = " . $USERID

Procedure with variable number of columns
Hi, I have a procedure that looks like this:

PROCEDURE PROC(p_cursor OUT sys_refcurso

DELETE rows based on content
I have a link in my rows

$bit="http://bit.ly/abcd";
$query = mysql_query("D

Array to string conversion
Can anyone help me with this?

Notice: Array to string conversion in /home/..../index.php on l

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