Jump to content

Search the Community

Showing results for tags 'list'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 10 results

  1. I want to have a list that has pictures on either side of each li. As the li gets bigger (more content), the images should stay in the middle of the li. I've tried numerous divs, before and after classes and gone a bit mad. Any ideas please?
  2. Hai Folks, Please help me in this situation, Actually my case is bit complicated i have a list of few movies.please check the attached file. If we click on each movies ,i want to direct into next page describing details of that clicked movie (review,image,syopsis,time).can you help me to write code following is the code for showing movie list. <?php $movienames=''; //connecting to databse : using 4 values $con=mysqli_connect("localhost","rino","7eL8axn749QQMBzC","project"); // checking:if 4 values are true , show error:if its false if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } // if its true:select values from appropriate table $result=mysqli_query($con,"SELECT * FROM movies"); // if in table fetch it. $row_cnt = mysqli_num_rows($result); if($row_cnt>0) { while($rino = mysqli_fetch_array($result)) { $movienames .= $rino['name'] ."<br>"; } I created tables in database,movies,details etc. nameid of movies table is same as nameid of details.
  3. Hai guys, I'm busy with a category display script, but do I replace the text for an URL? Example: I've this code at the moment: <?php $query="SELECT `cat` FROM `video` WHERE `id`='".$_GET['video']."'"; $sql=mysql_query($query) or die(mysql_error()); while($line=mysql_fetch_array($sql)) { echo ''.$line['cat'].''; } ?> The output for example is: Category1,Category2,Category3. So, what do I need to let the output be like this: <a href="category.php?cat=Category1">Category1</a>, <a href="category.php?cat=Category2">Category2</a>, <a href="category.php?cat=Category3">Category3</a> Thanks for any help!
  4. Hey guys, so i am retrieving data from my database and have called on a certain variable.. this variable is called $personality_traits and is containing a string with all the tags (honest,go getter,lazy,humble,etc..) each persons profile is showing these traits as to what is being stored per their own ID. so one individual profile would show profile 1 Traits : Happy, Organized, Honest. Brave profile 2 Traits : Quiet, Conservative, Shy, Smart profile 3 Traits : Honest, Smart, Go getter, Now my issue: i am now trying to break this variables string into parts , so that i can echo the tags individually , and create hrefs from them accordingly. When i use the explode() this works for me and separates each tag into an index inside an array while ($row = mysql_fetch_assoc($links)) { extract($row); $user_traits // data from field `user_traits` FROM `database` $traits = explode( ',' , $user_traits ); echo $user_traits; print_r($traits); Which results in; ( for 1 profile example) positive,warm,fun Array ( [0] => positive [1] => warm [2] => fun ) My Question; How can i now list all the indices in this array for each user , as if i were inputting $user_traits ? i cant just type echo $traits[0]; echo $traits[1]; echo $traits[2]; since each profile has a different amount of variables to be defined, some have only 2 traits, while others might have 4,5 or even 6. I am assuming there is a way to do this using a mysql command , but is there anyway PHP wise to solve this problem ? any ideas or suggestions would be much appreciated, this is a feature i definitely want to have showing for my users.
  5. Hey all, I'm just starting to get on the PDO bandwagon with PHP. One thing I do a lot is to fetch the result of a query straight into a variable using list. Something like list($name) = mysql_fetch_row(mysql_query("SELECT name FROM names WHERE userID='1'")); Is there a similar thing I can do with PDO rather than having to loop through with a while or similar. Thanks in advance.
  6. Dear All, I am trying to put together a php application, which connects to Gmail IMAP server and downloads a user's inbox folders and mails. The problem I am currently facing (and apparently can't resolve) is, when I am downloading the gmail folders with imap_list function, I am getting localized labels / folder names. Is there any way to always get the native English names? I know that Google has an IMAP extension, namely XLIST, which addresses this issue, but I haven't found an example of using this extension with php. I've found examples of using XLIST with frameworks like Zend, but since I am not using them, those examples did not help me. Is there a way of using Google's and Apple's IMAP extension in php (without any framework)? Or, I have to use a php extension? Do you know if PEAR's IMAP library can handles the Google IMAP extension? Any help is highly appreciated! Regards, Antal
  7. Hi there! I am currently trying to edit a wordpress theme, and with my limited knowledge, I got stuck first thing., I have just added a subpage to a page on my blog for the first time, and would love to display a list in the sidebar on the parent that displays the parent itself, and all children. On the childpages, this same list (parent+children) should be visible. So, let's say I have a page called: contact, with subpages like 'route' and 'form', it should look like this, on the parentpage (contact) and the children: Contact Route Form On pages that do not have children, there should be no list. Looking through the wordpress codex, I found the following code to add to my sidebar.php: <?php //if the post has a parent if($post->post_parent){ //collect ancestor pages $relations = get_post_ancestors($post->ID); //get child pages $result = $wpdb->get_results( "SELECT ID FROM wp_posts WHERE post_parent = $post->ID AND post_type='page'" ); if ($result){ foreach($result as $pageID){ array_push($relations, $pageID->ID); } } //add current post to pages array_push($relations, $post->ID); //get comma delimited list of children and parents and self $relations_string = implode(",",$relations); //use include to list only the collected pages. $sidelinks = wp_list_pages("title_li=&echo=0&include=".$relations_string); }else{ // display only main level and children $sidelinks = wp_list_pages("title_li=&echo=0&depth=1&child_of=".$post->ID); } if ($sidelinks) { ?> <h2><?php the_title(); ?></h2> <ul> <?php //links in <li> tags echo $sidelinks; ?> </ul> <?php } ?> This works perfect on a child page, displaying child and parent in a neat linkable list. But on the parent page it only displays the child. How can I also add the parent there? Thank you in advance for your help!
  8. Hello All, I was wondering if anyone had some fluid techniques for nav bars. I want to evenly distribute each li in the nav bar and have them be fluid. Structure like the following: <nav id="nav" class="width"> <div id="slide" class="body"> <ul id="bar"> <li><a href="#">NEWS</a></li> <li><a href="#">SPORTS</a></li> <li><a href="#">OPINION</a></li> <li><a href="#">LIFESTYLES</a></li> <li><a href="#">A&E</a></li> <li><a href="#">BLOG</a></li> <li><a href="#">ABOUT</a></li> </ul> </div> </nav> the width class is 100% and the body is 80% centered with the margin 0px auto. I need to know the padding for each li to make it fluid and evenly distributed through the ul bar. Thanks in advance!
  9. I want to list out the cities that are from the SQL statement in rows of 3 but I'm doing something wrong. Can someone check me on this? I want it to look like this: City, State (#) City, State (#) City, State (#) City, State (#) City, State (#) City, State (#) City, State (#) City, State (#) City, State (#) City, State (#) City, State (#) City, State (#) $fquery = mysql_query("SELECT state, city, count(city) as num FROM needs WHERE status='posted' GROUP BY state, city ORDER BY state, city"); echo "<table><tr>"; $i=0; while ($frows = mysql_fetch_array($fquery)) { $fcity = $frows['city']; $fstate = $frows['state']; $fcitycount = $frows['num']; // num is holding your count by city if ($i == 0) { echo "<td><a href='node/browseresults.php?city=$fcity&state=$fstate'>$fcity, $fstate ($fcitycount)</a> $i</td>"; ++$i; } if ($i < 3) { echo "<td></td><td><a href='node/browseresults.php?city=$fcity&state=$fstate'>$fcity, $fstate ($fcitycount)</a> $i</td>"; ++$i; } if ($i == 2) { echo "</tr><tr></tr><tr></tr><tr><td><a href='node/browseresults.php?city=$fcity&state=$fstate'>$fcity, $fstate ($fcitycount)</a> $i</td>"; $i = 0; } } echo "</tr></table>";
  10. Hello, i have a question. I've recently started a website with videos, and I was looking for something like this. http://video.xnxx.com/tags/ . But i want to make a list with a to z. sorry for the link but this is basically what i'm looking for. ( My website is not based on porn ) so how to echo all the list form my table in the database. From videos Where title LIKE '%Funny%' as Funny Thanks.
  • 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.