Jump to content

allinurl

Members
  • Posts

    27
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

allinurl's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi, I'm trying to setup the RSS feed for my blog and I'm encountering a problem because my title and content use XHTML entities (accented characters mostly). XML validation says they are not defined and looking around, it seems I can fix this using a DTD inclusion. So I modified the template for RSS 2 to include this right after the <?xml tag: <!DOCTYPE rss [ <!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent"> <!ENTITY % symbol PUBLIC "-//W3C//ENTITIES Symbols for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent"> <!ENTITY % special PUBLIC "-//W3C//ENTITIES Special for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent"> ]> However, this does not help at all. One thing to note is that if I copy paste the definition for &eagrave <!ENTITY egrave "รจ"> <!-- latin small letter e with grave, U+00E8 ISOlat1 --> and put it directly in the !DOCTYPE tag, it works and the &eagrave is recognized as a valid entity. What I would like to avoid is to copy all entities in the rss template. Can anyone help me out with this? Thanks
  2. I have a remote server where I can't re-compile php to use mysql, but I have full access to install stuff; I installed mysql-server which is running fine. I have the open source code of the php version that is currently running on the server. Inside the php-5.1.2.tar.gz there is /php-5.1.2/ext/mysql/. Is there a way that I could compile what is inside that directory perhaps in my local machine and generate somehow the mysql.so extension and use it on the remote server? comments and suggestions will be appreciate it. Thanks
  3. Hello, I have the following array where Im trying to display just one element for the first column, what I mean is not to display duplicate elements of the first column. What would be the best way to do this? Thanks $array = array ( array("test foo", 10, 795, "cc"), array("hello bar again", 10, 795, "dd"), array("test foo", 10, 795, "cc"), array("test foo", 10, 795, "cc"), array("hello bar again", 10, 795, "bb"), array("mike bar", 10, 775, "aa"), array("mike bar", 10, 775, "aa") );
  4. Does anyone knows how can I remove all metacharacters except a dot. I just wanna leave numbers, letters, and dots e.g www.site.com
  5. thanks thats what I was looking for~~
  6. does anyone knows how to pass an array into a URL, what I mean is if I have Array ( [0] => var1 [1] => var2 ) into the url as parameter, so I end up with something like: url.com?param=$var1&param=$var2 Thanks in advance
  7. beginning, but still don't get it.
  8. where specifically I should have the condition?
  9. thanks both, but when I click on 1 still makes me look like if I'm in number 2, and 1 is still a link. The idea is basically the same functionality as now, but when I click on each number I dont wanna make that current number a link
  10. if I add a condition to check if $i == 1 then when I click 1 it keeps been a link $num = ((int) $_GET['num']); for ($i = 1; $i < 12; $i++) { $val = ($i - 2 )* 10; if ($i == 1) { print '<strong><a href="index.php">'.$i.'</a></strong> '; } else if ($val != $num) { print '<strong><a href="index.php?num='.$val.'&var=1">'.$i.'</a></strong> '; } else { print $i.' '; } }
  11. thanks for your reply, well basically what I'm trying to do is a counter that for instance when I click in number 2 the $num value should start at 0, if I click on 3 the $num value should be 10 and so on, but when I click on 1 it should be just the url with out any param. In addition it doesn't make the current number a link.
  12. Hello, What I'm trying to do is basically the same thing is doing right now, with the same formula, with the exception of, when I click 1 the <a href> shouldnt be "index.php?num=-10&var=1" it should be just index.php $num = ((int) $_GET['num']); for ($i = 1; $i < 12; $i++) { $val = ($i - 2 )* 10; if ($val < -10) { print '<strong><a href="index.php">'.$i.'</a></strong> '; } else if ($val != $num) { print '<strong><a href="index.php?num='.$val.'&var=1">'.$i.'</a></strong> '; } else { print $i.' '; } } Thanks in advance
×
×
  • 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.