The simplest PHP problem for Super beginners $ the mobile value is 123456
Above normal output
'echo $mobile'?>
This will not work. I would like to ask how to make a try to lose the result.
'Mobile' => '123'
Reply to discussion (solution)
Echo "'mobile' => '$ mobile '";
Echo "'mobile' => '$ mobile '";
Can echo be placed behind?
For example, 'mobile' => 'echo $ mobile'
All reported errors and struggled
No!
Rules are rules that must be followed
Then, how can I put the value in the 'mobile' => '{Here }'
You can describe your original requirements.
Don't modify it on the basis of your code ..
'Sdk-WLL-010-00133 ', // The provided account 'pwd' => strtoupper (md5 ('sdk-WLL-010-00133 '. 'b6aedea-'), // Here, the password must be encrypted in md5 (sn + password) 32-bit capital 'mobile' => '123 ', // multiple mobile phone numbers are separated by commas (,). there is no length limit in post theory. we recommend that you send a group of less than or equal to 10000 mobile phone numbers 'content' => 'Order successfully', // text message content; 'text' => '', 'rrid' => '', // null by default. if it is null, the system-generated ID string is returned. if the pass-through ensures that the value is unique, the input value 'stime' => ''is returned. // the scheduled time format is 11:09:21); // Construct the string foreach ($ argv as $ key => $ value) {if ($ flag! = 0) {$ params. = "&"; $ flag = 1 ;}$ params. = $ key. "="; $ params. = urlencode ($ value); $ flag = 1 ;}$ length = strlen ($ params); // Create a socket connection $ fp = fsockopen ("sdk2.zucp.net", 8060, $ errno, $ errstr, 10) or exit ($ errstr. "---> ". $ errno); // Construct the header of the post request $ header = "POST/z_mdsmssend.aspx HTTP/1.1 \ r \ n"; $ header. = "Host: sdk2.zucp.net \ r \ n"; $ header. = "Content-Type: application/x-www-form-urlencoded \ r \ n"; $ header. = "Content-Length :". $ length. "\ r \ n"; $ header. = "Connection: Close \ r \ n"; // add the post string $ header. = $ params. "\ r \ n"; // send post data fputs ($ fp, $ header); $ inheader = 1; while (! Feof ($ fp) {$ line = fgets ($ fp, 1024 ); // only the returned data on the page is displayed when the request packet header is removed. if ($ inheader & ($ line = "\ n" | $ line = "\ r \ n" )) {$ inheader = 0;} if ($ inheader = 0) {// echo $ line;} echo $ line; fclose ($ fp);?>
I want to call the variable value in the red part!
'Mobile' => '123'
$ Argv = array ('SN '=> 'sdk-WLL-010-00133', // The provided account 'pwd' => strtoupper (md5 ('sdk-WLL-010-00133 '. 'b6aedea-'), // The password must be encrypted in md5 (sn + password) 32-bit capital 'mobile' => ''. $ shoujihao. '', // multiple mobile phone numbers are separated by commas (,). there is no length limit in post theory. we recommend that you send a group of less than or equal to 10000 mobile phone numbers 'content' => 'Order successfully', // text message content; 'text' => '', 'rrid' => '', // null by default. if it is null, the system-generated ID string is returned. if the pass-through ensures that the value is unique, the input value 'stime' => ''is returned. // the scheduled time format is 11:09:21);
Enclose a. connected string with quotation marks (single or double quotation marks) between a string and a variable)
Then, how can I put the value in the 'mobile' => '{Here }'
Nima, the Lord, your avatar label is too attractive. I just thought about your code help, and my eyes were attracted to my profile picture. Dizzy, really? Siphu.
Double quotation marks:
Echo "'Mobile'". "=>". "'". $ mobile ."'";
Look at the previous posts, and now they are all smiling!