Jump to content

luki123

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Posts posted by luki123

  1. hi,

    i have a question about creating a rss feed.

    everything works fine except the <description></description>.

    $row["articleText"] contains html code and hyperlinks to other websites. is there a way to display them as a link within the feed? i mean if someone subscribes to the feed all the links should be clickable.

     

     

    while ($row = mysql_fetch_array($result))
    {
      $items .= '<item> 
         <title>'. htmlentities(strip_tags($row["title"],’ENT_QUOTES’)) .'</title> 
         <link>http://www.hugeinc.com/news/index.php?ID='.$row["ID"].'</link>   
         <description>'. htmlentities(strip_tags($row["articleText"],’ENT_QUOTES’)).'></description>
      </item>'; 
    }
    

     

     

     

    <description>'.$row["articleText"].'></description>

    its not working. i get the following error because articleText contains also " & "

    XML Parsing Error: undefined entity -> &

     

    <description><![CDATA['. htmlentities(strip_tags($row["articleText"],’ENT_QUOTES’)).']]></description>

    Links are showed as normal text, because all the html tags are removed.

     

    thanks

     

    luki

     

  2. hi,

    i try to insert CZECH text with all these special characters into a mysql db, but when i do that i see only strange characters inside the db table

     

    mysql_query("INSERT INTO myTable (Firstname) Values ('ěščřžů ĚŠČŘŽÝÁÍÉŮÚ')");

     

    database table row:

    Ä›??Ä??™???? Äš? Ä????????????‰?®?š

     

    does anyone knows what i have to change (character set?)

     

    thanks for helping

     

    luki

  3. hi,

    could anyone help me with a preg_replace:

     

    $myString looks either like $myString1 or $myString2:

     

    $myString1 = "<a href=\"http://www.outsidelink.com/\" target=\"_blank\">This </a>";

    $myString2 = "<a href=\"index.php\" target=\"_self\">This </a>";

     

     

    if $myString contains http://  cut out  \" and \"  (at href and target)

     

    if in $myString there is NO http://  cut out  \" and \"  (at href and target) and add http://www.outsidelink.com/

     

    thanks for helping

     

    luki

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.