Unity string[] split to PHP email send.

Hi,

I’d like to split strings and attaching them to e-mail.

  1. private string nevek;

  2. Form2.AddField (“nevekE”, nevek); //I have sent them with Enumerator to php

  3. nevekE= _REQUEST[“nevekE”]; //This is receiving strings from unity

  4. $piecesN = explode(" ", $nevekE); //After words are one space

  5. $piecesN[0]

At this point the string isn’t exploded. If I add strings manually to php, then working,
but when I importing from Unity isn’t exploding.

Any idea will be helpful!

There’s no way we can’t help unless you show us the code you already have.

maybe space character gets encoded to something else ?

I think the codes are enough, the problem is the split/explod in php.
I have a lot of names between commas, this is $nevekE.

$try1 = “A B C D” // Explode working well
$try2 = coming from Unity, the result is a row without line break.

Screenshot from Mail.


Response from PHP :
echo $piecesN[0];

You have right mgear!!!
Thank you so much!!!
:slight_smile:

I have used “\n”, not space.
nevek +=database.items*.itemName + “\n”;*
And when I tried to explode then I used space but this wasn’t good.