Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* INSIDE THE ARRAY $currencies
- array (size=3)
- 'currency' => string 'AUD' (length=3)
- 'photo_pricing' => string 'http://localhost/ods/wp-content/uploads/2019/12/AUD-Photo-Price.jpg' (length=67)
- 'video_pricing' => string 'http://localhost/ods/wp-content/uploads/2019/12/AUD-Video-Price.jpg' (length=67)
- array (size=3)
- 'currency' => string 'CAD' (length=3)
- 'photo_pricing' => string 'http://localhost/ods/wp-content/uploads/2019/12/CAD-Photo-Price.jpg' (length=67)
- 'video_pricing' => string 'http://localhost/ods/wp-content/uploads/2019/12/CAD-Video-Price.jpg' (length=67)
- array (size=3)
- 'currency' => string 'GB' (length=2)
- 'photo_pricing' => string 'http://localhost/ods/wp-content/uploads/2019/12/GBP-Photo-Price.jpg' (length=67)
- 'video_pricing' => string 'http://localhost/ods/wp-content/uploads/2019/12/GBP-Video-Price.jpg' (length=67)
- */
- ?>
- <?php
- $result = [];
- foreach($currencies as $currency){
- //my condition
- if(in_array( 'CAD' , $currency )){
- echo $currency['photo_pricing'];//this image must be the image under CAD
- echo $currency['video_pricing'];//this image must be the image under CAD
- break;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement