Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7097821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T10:58:59+00:00 2026-05-28T10:58:59+00:00

I have the following code: <h2> <?php echo $this->item->title; ?> </h2> Dependent on the

  • 0

I have the following code:

<h2>
  <?php echo $this->item->title; ?>
</h2>

Dependent on the word being pulled in as the title, I need to place a different image to the left of the title text.

Images: uk.png, france.png, germany.png

So if the title text says France, I need to pull in the france.png image. So I need a list of images and titles that ‘could’ be used and if a title doesn’t match an image, no image is shown.

Hope this makes sense…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T10:59:00+00:00Added an answer on May 28, 2026 at 10:59 am
    <?php
    
      $images = array (
        'France' => 'france.png',
        'UK' => 'uk.png',
        'Germany' => 'germany.png'
      );
    
      if (isset($images[$this->item->title])) {
    ?>
    
    <img src="<?php echo $images[$this->item->title]; ?>" />
    
    <?php } ?>
    
    <h2>
    <?php echo $this->item->title; ?>
    </h2>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have the following code : <input type=text value=<?php echo $_GET['msg']; ?>> This input
I have the following code: <html> <head> <title><?php echo $GLOBALS['L']['title']; ?></title> </head> <body> <ul
I have the following js files in my code for EditInPlace... <?php echo $javascript->link('jquery.js');?>
I have the following code: <select name=to class=combo value=' <?php if(isset($_POST['reply'])) { echo <option
I have the following PHP code: echo ' <td id='.$metaso['semanaventa'].'td1><form id='.$metaso['semanaventa'].'form name='.$metaso['semanaventa'].'form class=dinamic action=compromiso_funciones.php
I have a file called: file.php contained in this file is the following code:
I have following code: $boxId = 1; $explainationBox='<input type=button id=<?php echo $boxId; ?> value=send
Can someone please explain this to me? I have the following code: <form action=<?php
i've been working on this question since yesterday, i have the following code.. <?php
I have the following code: <?php echo $form->create('User', array('url' => array('controller' => 'users', 'action'

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.