Skip to main content

Cool string tricks with PHP

Tags

PHP

The PHP development team announces the immediate availability of PHP 5.4.10 and PHP 5.3.20. These releases fix about 15 bugs. Please note that the PHP 5.3 series will enter an end of life cycle and receive only critical fixes as of March 2013. All users of PHP are encouraged to upgrade to PHP 5.4.

For source downloads of PHP 5.4.10 and PHP 5.3.20 please visit our downloads page, Windows binaries can be found on windows.php.net/download/.

The list of changes are recorded in the ChangeLog.

PHP 5.4.9 and PHP 5.3.19 released!

Substring extractor with PHP

$sub_anchor = strip_tags($submitted, 'span');
$sub_arr = explode(' ', $sub_anchor);
$user_obj = user_load_by_name($sub_arr[2]);

Member for

3 years
Matt Eaton

Long time iOS and server side team lead with a love for Python, Swift, ObjC, C, C++, networking, testing, network debugging, embedded development, technical writing, and research.

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.