View Single Post
Old 05-02-2008, 01:11 AM   #2 (permalink)
xrvel
Platinum Lifetime Member
 
xrvel's Avatar
 
Name: Kurniawan
Last Online: 07-02-2008 12:11 AM
iTrader: (0)
Join Date: Nov 2007
Posts: 17
DNF$: 330
Location: Indonesia
Country:


Try this
PHP Code:
<?php
$url 
'/category/3/pictures45.html';

preg_match('/\/category\/([0-9]+)\/([a-z]+)([0-9]+)/i'$url$match);
echo(
'<pre>' print_r($matchtrue) . '</pre>');

$id $match[1];
$pagenumber $match[3];

echo (
'<p> ID = ' $id '</p>');
echo (
'<p> Page number = ' $pagenumber '</p>');
?>
xrvel is offline   Reply With Quote