I have the following PHP IF statements
<?php
if ($crs_cat1 == "Business"){
$catimage ="businessImage.png";
}
else if ($crs_cat1 == "Leadership") {
$catimage = "leadershipImage.png";
}
else if ($crs_cat1 == "Media and Design") {
$catimage = "mediadesignImage.png";
}
else if ($crs_cat1 == "Web Development") {
$catimage = "webdevelopmentImage.png";
}
else if ($crs_cat1 == "Mobile Development") {
$catimage = "mobileDevelopment.png";
}
else if ($crs_cat1 == "Project Management") {
$catimage = "business5.png";
}
else if ($crs_cat1 == "Databases and Business Intelligence") {
$catimage = "businessAnalysis.png";
}
else if ($crs_cat1 == "IT Service Management") {
$catimage = "itService.png";
}
else if ($crs_cat1 == "Business Analysis and Agile") {
$catimage = "businessAnalysis.png";
}
else if ($crs_cat1 == "Network Security and OS") {
$catimage = "networkSecurity.png";
}
else if ($crs_cat1 == "Virtualization and Cloud Computing") {
$catimage = "virtualization.png";
}
else if ($crs_cat1 == "Software Quality & Testing Tools") {
$catimage = "testing.jpg";
}
else if ($crs_cat1 == "Microsoft") {
$catimage = "microsoft2.png";
}
else if ($crs_cat1 == "%Adobe%") {
$catimage = "adobe.png";
}
else if ($crs_cat1 == "IBM") {
$catimage = "ibm.jpg";
}
else {
$catimage = "negotiation.png";
}
?>
In the if statements I would like to be more like if its like Business or leadership, in the sense the result doesn't have to be exact it just has to be similar enough. For instance if == to adobe, and the title is adobe dreamweaver, than it should populate
Aucun commentaire:
Enregistrer un commentaire