March 13th, 2013, 05:30 AM
How to get 8pp from "A4 Heavy Self Cover Booklets 8pp" using php?
March 13th, 2013, 05:47 AM
Be more specific. Is it the "*pp" you're looking for? The last word in the string? Something that starts with a number? The sixth word? The only word with three characters? A word that contains both a number and two repeated letters?
Comments on this post
March 18th, 2013, 05:24 AM
Yes, iam looking for *pp.
Example1: A4 Heavy Self Cover Booklets 8pp
Example2: A4 Heavy Self Cover 16pp Booklets
Example3: A4 Heavy 8pp Self Cover Booklets
How we get *pp using php?
March 18th, 2013, 09:05 AM
$str = 'A4 Heavy Self Cover Booklets 8pp ';
preg_match('/\d+pp/i', $str, $foo);
$pp = $foo;
HEY! YOU! Read the New User Guide and Forum Rules
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin
"The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002
Think we're being rude? Maybe you asked a bad question
or you're a Help Vampire.
Trying to argue intelligently? Please read this.
March 19th, 2013, 02:46 AM
Thanks ManiacDan. I got it.