How do I write the following javacript code in php:
var ShareImageIdVar = location.href.match(/\d+/);
there is a number in the url that I want to store it in the variable ShareImageIdVar.
an example of a possible url:
http://www.mysite.com/5.php
http://www.mysite.com/41.php
http://www.mysite.com/547.php
http://www.mysite.com/2145.php
you js code is identify the first numerical string from all string
try this in PHP
thanks