note 32596 deleted from function.mysql-stat by didou

From: Date: Thu, 03 Jul 2003 08:14:56 +0000
Subject: note 32596 deleted from function.mysql-stat by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-51407@lists.php.net to get a copy of this message
Note Submitter: mike@pcmedx.com ---- The example given does not work exactly as shown. Apparently, it's MySQL that returns the string incorrectly, not PHP (one space between the last two items rather than two). Here's a nice solution that returns the corrected array: $stat = explode(' ',mysql_stat($conn_id)); list($stat[6],$stat[7]) = preg_split('/\s(Q.+)/',$stat[6],-1,PREG_SPLIT_DELIM_CAPTURE);

« previous php.notes (#51407) next »