Jump to content

ChrisA

Members
  • Posts

    11
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

ChrisA's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. This is all HTML, so please see an SEO tutorial, eg. http://guides.seomoz.org/beginners-guide-to-search-engine-optimization http://www.websitepublisher.net/seo-guide/
  2. I would definitely keep revisions if possible. Sounds like you would be better off having two tables - one with songID and title, then a separate one with songID, lyrics and revisionNumber? If you store it all in one table, you'll end up duplicating at least the song title in many rows (see db normalization).
  3. Is this a particular curve with a formula, that you could perhaps fit to the points you have? Then use the formula to calculate your points? Or would cubic interpolation be good enough?
  4. Fair enough. I would probably search the chopped string for the last '<', to see if it is after the last '>'. If it is, then you've probably half chopped a html tag. e.g. if(strlen($row['news']) > 200) { $news = substr($row['news'],0,200); $news .= " <a href=\"/news/id=$row[id]\">... read more</a>"; } // check if the last < is after the last > if (strrpos($news, '<') > strrpos($news, '>')) { // if so, chop off the bit from the last < onwards $news = substr($news, 0, strrpos($news, '<')); } Another option would be to strip html tags from the string before you chop it? Then you wouldn't have any issue with half chopped tags...
  5. Cubic spline looks like some fairly hardcore maths to code up. Whats the background to the interpolation required? Is is in 1D, or 2D? As an aside, for anything other than basic linear interpolation, you would need to input more two input points. Anything more complicated meeds to know a larger area which it can use to interpolate.
  6. A more robust solution would be to use PHP DOMDocument capabilities to edit the string so that you only count visible characters, and only remove plain text, not html tags. Unfortunately, its rather more complicated to set this up, but as I say, it will provide you with a robust method. Google search may provide a tutorial to follow.
×
×
  • 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.