Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

PHP - combine strings as variable

0 votes
19 views
added Dec 13, 2018 in PHP by LC Marshal Captain (20,510 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>

 

1 Response

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

 

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