0

Sir, I wants to amend my php code so that it will show post description and post title simultaneous.

The undermentioned php code is to replace my Wordpress Post title with Coupon Title:

$my_post['post_title'] = str_replace("&", "and", $v['coupon_title']);

The undermentioned php code is to replace my Wordpress Post Description with Coupon Title:

$my_post['post_content'] = str_replace("&", "and", $v['coupon_description']);

I want customized the php to replace $my_post['post_content'] with $v['coupon_title'] &

$v['coupon_description']

Please help ?

Adam
  • 1,149
  • 2
  • 14
  • 21
Pradeep
  • 1
  • 2
  • So you want to concatenate `$v['coupon_title']` and `$v['coupon_description']` as `$my_post['post_content']` or what? – ArtOsi Jan 09 '18 at 16:05
  • Yes sir, you are correct that i wants to concatenate $v['coupon_title'] and $v['coupon_description'] – Pradeep Jan 09 '18 at 16:29
  • So since you already have `$v['coupon_title'] ` as `$my_post['post_title']` then `$my_post['post_content'] = $my_post['post_title'] . str_replace("&", "and", $v['coupon_description']);` won't work? – ArtOsi Jan 09 '18 at 17:36
  • Sir, how can it be possible. Pls help – Pradeep Jan 10 '18 at 15:10

0 Answers0