General Details
|
PHP (Hypertext Preprocess...
|
Posted 23 Days Ago
|
43 Views
|
Received 1 Rating
|
|
Function - URL Tag Highlighter
Description
This function will dynamically generate given links of different size and colours as seen in the attached screen shot.
Technical
Since the links are generated in different sizes and colours you need to pass all the URLs to the function. To pass the urls you simple add each one in it's own array as follows (would add 2 links).
$links = array(
array('url' => 'index.php',
'link' => 'Category (165)',
'attribs' => ''),
array('url' => 'index.php',
'link' => 'Group (135)',
'attribs' => '')
)
);
url = the url of the link
link = the name of the link, i.e. what you will click
attribs = anything else you want in the <a> tag such as style, target, etc
Repeat these until you have finished adding all the links you want to be formated.
array('url' => 'index.php',
'link' => 'Group (135)',
'attribs' => '')
)
Then simply call the function like this:
highlight_links_as_tags($links);
Which will return the links ready for you to print etc.
$preseve_spaces = will prevent the link from splitting on to separate lines
$spacing = the amount of spacing between each link (KEEP the trailing space since this prevents all the links spanning a single line if $preserve_spaces = true.
Source Code
|
Download Source Code
highlighting tag code.zip ( 0.00Mb )
|
NEVER open a .exe, .bat, .cmd, or other executable file since that is where viruses are likely to live. Please virus scan all files you download.
|
More "PHP (Hypertext Preprocessor)" Source Codes By This Author
Recently Posted "PHP (Hypertext Preprocessor)" Source Codes
Recently Rated "PHP (Hypertext Preprocessor)" Source Codes
|