$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?

Member Avatar for diafol

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.