Reply to String Of Text (Number of Pixels / Pixel Size / Pixel Length)

Your name:

Reply:


Posted by Jim Carlock on 03/11/06 19:32

If I'm putting together a list of links and I want to get add each
item one at a time inside a foreach($aNames as $sName) loop,
is there an easy way to get the number of pixels that the $aName
takes up?

For instance, in creating a set of links...

foreach($aLinks as $sLink) {
if ((pixelsize($sLink, $sFont, $iFontSize) . pixelsize($sHTML . " ", $sFont, $iFontSize)) < 400) {
$sHTML .= " " . $sLink;
} else {
$sHTML .= "<br />\n" . $sLink;
}
}

The goal is to keep the whole link on one and only one line letting
the browser automatically break up any given link.

Thanks,

Jim Carlock
Post replies to the newsgroup.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация