PHP - combine strings as variable

0 votes
383 views
added Dec 13, 2018 in PHP by LC Marshal Captain (25,790 points)
<?php 
$live_slider_img = 'https://dbv47yu57n5vf.cloudfront.net/live/2019/slider/';

$slider_img_1 = $live_slider_img . '1.jpg';
$slider_text_1 = "<span class='slider-title'>Aspire, inspire & empower.</span><span class='slider-subtitle'>Celebrating the best of Malaysia.</span>";
$slider_link_1 = 'livemag/01/';
  
?>


<div data-img="<?php echo $slider_img_1 ?>" data-caption="<?php echo $slider_text_1 ?>" >
    <a href='<?php echo $slider_link_1 ?>' target='_blank'></a> 
</div>

 

2 Responses

0 votes
responded Dec 20, 2018 by LC Marshal Captain (25,790 points)
<?php echo $s3_asset_live19 . '19-editor-note-sm.jpg' ?>

 

0 votes
responded Aug 6, 2019 by anonymous
$result = $data1 . $data2;

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...