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

  • Home
  • SEARCH
  • 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 6737267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:13:44+00:00 2026-05-26T11:13:44+00:00

Currently working on a bespoke ecommerce application using Codeigniter. I have a products table

  • 0

Currently working on a bespoke ecommerce application using Codeigniter.

I have a products table with a list of products and a news table with a list of news items.

For example, the news items are displayed dynamically using a foreach loop, i would like to add images to the news items dynamically though some news items have 2 or 3 images.

I understand i could use an image_id to match the news item/product to an image within a table (url links of images), but what about multiple images, is it a fie
ld type? a different database setup?

News.php

<a href="news/<?php echo $news_item['slug'] ?>
<h2><?php echo $news_item['title'] ?></h2>
</a>
<div id="main">
    <?php echo $news_item['text'] ?>
</div>
<a href="news/<?php echo $news_item['image'] ?>">

<?php endforeach ?>
  • 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-26T11:13:45+00:00Added an answer on May 26, 2026 at 11:13 am

    Perhaps you could serialize an array of images (containing urls of images) for each news into a JSON string and input it into the image field in your news table.

    See it here: Serialize function

    Will that work for you?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working with on a fat client application using a self written RMI
Currently working on a 3D media engine using C# and I have come across
Am currently working on an application that requires users to submit posts and comments
I`m currently working on a script, and I have the following situation. function somnicefunction()
Currently working on a Spring 2.5 web application, looks as if the business has
I'm currently working on a project for a web application that may be installed
I'm currently working on my first WPF application, and I'm curious as to whether
I am currently working on a bespoke e commerce Django project. The site works
Im currently working on a site which will contain a products catalog. I am
I am currently working on my own little project, but I have a little

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.