[ create a new paste ] login | about

Link: http://codepad.org/iywZshyj    [ raw code | output | fork ]

PHP, pasted on Nov 1:
1
2
3
4
5
6
7
8
9
10
11
<?php

$extra = "Kevin";

$names  = array("John", "Kevin", "Cameron", "Santosh", "Ali");
$result = in_array($extra, $names, true);
$image  = $result ? 'maria2.png' : 'maria.png';
printf(
    '<img src="http://yespricer.com/theme/Freshness/images/%s" width="75"/>'
    , $image
);


Output:
1
<img src="http://yespricer.com/theme/Freshness/images/maria2.png" width="75"/>


Create a new paste based on this one


Comments: