Return only IMG tag with no <table> <td> <tr>? Return only IMG tag with no <table> <td> <tr>?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Return only IMG tag with no <table> <td> <tr>?

Started by judl, December 07, 2009, 11:03:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

judl

I am trying to make a call to cpmfetch and insert html code smartly into my page. The php seems to return an entire <table>. Is there an option so I can just get back the image tag?

Thanks in advance,
Chris

Nibbler

Use


$objCpm->cpm_setReturnType('resultset');


Then format the data as you wish.

judl

Seems like there have been a lot of posts about this. Everyone seems to take their own tact. If there is some sample code on how to deal with the resultset data set, it would be appreciated.

vuud

Quote from: judl on December 08, 2009, 01:36:01 AM
Seems like there have been a lot of posts about this. Everyone seems to take their own tact. If there is some sample code on how to deal with the resultset data set, it would be appreciated.

This gets into just plain old PHP.  If you pick up on learning some basic PHP you will be fine.  The results come back as an array, and you just need to loop through them.

Google on stuff like

  • Arrays in php
  • foreach loops in php
  • echo in php


Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco