I’m currently working on inserting some data into my posts, I’m trying to insert two sets of data into the post title and I’m kinda stuck.
$my_post = array(
'post_title' => $data['title'],
This works fine, but I need to add another one to the title, how can I do that? for example
'post_title' => $data['title'] && $data['count'],
Any help would be appreciated, thank you.
Use a dot
.
to concatenate the titles:See the PHP docs on string operators for more info.