How to concatenate two arrays value into an other one
I use Fullcalandar and i need concatenate two array into $eventsArray['title']
I need to do som开发者_运维技巧ething like that for title ( this method don't work...)
$eventsArray['title'] = $items['subject'] + $items['eventname'];
My code
foreach ($eventgroup as $items){
$eventsArray['title'] = $items['eventname']; $eventsArray['start'] = $items['date']; $eventsArray['weekends'] = 'false'; $events[] = $eventsArray; }
How can I do this please ? Thx
....
$eventsArray['title'] = $items['subject']. ' ' .$items['eventname'];
...
Read this Manual
To concatenate use the dot
$eventsArray['title'] = $items['subject'].$items['eventname'];
Slightly more readable method:
$eventsArray['title'] = "$items[subject] $items[eventname]";
精彩评论