Create an array of elements from text between # tag

preg_match_all('/#(.*?)\#/s', $text, $matches);

Ex: janaki #ranjan# mahapatra #my name#
Output: array[0=>ranjan,1=>myname];

About the author

Janaki( - A Software developer with 9+ years of experience in multiple technology projects across web, mobile, and cloud applications with expertise in PHP, C#, MySQL, Web services and open source platforms.

Similar Posts

VMWare shared folder as apache vhost
IIS redirect

Leave a reply


Eye Test: * Time limit is exhausted. Please reload CAPTCHA.