General Community > Scripting Help

A bit of PHP help, please

(1/1)

TonyJ:
I'm modifying a PHP file, found on the SMF forums, that allows me to import 300 users into the database.

As I don't have their email addresses, as yet, I need to do something like this to complete the importation. Can someone tell me what syntax I need to append Key(4) to the following, please.

    'email' => $key[4], + "@youremail.com"

Thank you.

live627:
string concatenation uses the dot character not the plus sign.

TonyJ:
Sorry, but I'm not a PHP coder. :-( Can you show me how the concatenation should look, please.


--- Quote from: live627 on February 23, 2020, 06:14:25 PM ---string concatenation uses the dot character not the plus sign.

--- End quote ---

vbgamer45:
You would use the . instead of +
So
    'email' =>  $key[4] . "@youremail.com"

TonyJ:
Perfect! Thanks very much for your help.  :)

Navigation

[0] Message Index

Go to full version