I am using the following code to get an array of some values.
<?php
$sms = array();
foreach($contact_number as $value) {
$sms[] = array($value, $message);
}
var_dump($sms);
What I am trying to do now is include a variable $abc = "From Charlie Sheen";
with $message
in the first 3 elements of the above array, so that when the first three message appears I can see "From Charlie Sheen" at the end of the original message.
Could you please tell me how to solve this problem (its better if I don't have to make any change in the above array; I wish to add a new line of code to solve this problem)
The output of var_dump($sms);
is :
array(2) {
[0]=> array(2) {
[0]=> string(3) "123"
[1]=> string(15) "This is Message"
}
[1]=> array(2) {
[0]=> string(3) "456"
[1]=> string(15) "This is Message"
}
}