$split = preg_split('/[\s]+/',$datarow);
What does '/[\s]+/' mean? [\s] represents any whitespace character, '+' represents the whitespace character should be followed by something. But what do the two '\' mean?
$split = preg_split('/[\s]+/',$datarow);
What does '/[\s]+/' mean? [\s] represents any whitespace character, '+' represents the whitespace character should be followed by something. But what do the two '\' mean?
AFAIK, it means
at least one whitespace character.
the / at the start and end are your pattern delimiters. They have to be present for every pattern.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.