Jump to content

PHP MySQL Links


xlxprophetxlx

Recommended Posts

I have this code below which is almost like a pagination setup but is pulling links to specific content. If there is link 1 2 3 4 it would pull in a symbol of my choice like so: $spacer_end 1 $spacer_start 2 $spacer_start 3 $spacer_start 4 $spacer_end.  I was wondering if there is anyway I can display the array into a list: <ul><li></li></ul> format instead of imploding the array into nothing.

 

if ( $spacer_end ) {
echo '<span class="'. $menuclass .'"> '. $spacer_end .' </span>';
}

if ( $spacer_start ) {
$html = '<span class="spacer"> '. $spacer_start .' </span>';
echo implode( $html, $links );

} else {
echo implode( '', $links );
}

if ( $spacer_end ) {
echo '<span class="'. $menuclass .'"> '. $spacer_end .' </span>';
}

 

Any incite would be great.

 

Thanks,

 

-Mike

Link to comment
https://forums.phpfreaks.com/topic/88276-php-mysql-links/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.