mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-19 07:51:29 +01:00
Debug v18
This commit is contained in:
@@ -9930,13 +9930,17 @@ function printCommonFooter($zone = 'private')
|
||||
* Split a string with 2 keys into key array.
|
||||
* For example: "A=1;B=2;C=2" is exploded into array('A'=>1,'B'=>2,'C'=>3)
|
||||
*
|
||||
* @param string $string String to explode
|
||||
* @param string $delimiter Delimiter between each couple of data. Example: ';' or '[\n;]+' or '(\n\r|\r|\n|;)'
|
||||
* @param string $kv Delimiter between key and value
|
||||
* @return array Array of data exploded
|
||||
* @param string|null $string String to explode
|
||||
* @param string $delimiter Delimiter between each couple of data. Example: ';' or '[\n;]+' or '(\n\r|\r|\n|;)'
|
||||
* @param string $kv Delimiter between key and value
|
||||
* @return array Array of data exploded
|
||||
*/
|
||||
function dolExplodeIntoArray($string, $delimiter = ';', $kv = '=')
|
||||
{
|
||||
if (is_null($string)) {
|
||||
return array();
|
||||
}
|
||||
|
||||
if (preg_match('/^\[.*\]$/sm', $delimiter) || preg_match('/^\(.*\)$/sm', $delimiter)) {
|
||||
// This is a regex string
|
||||
$newdelimiter = $delimiter;
|
||||
|
||||
Reference in New Issue
Block a user