I googeled about loop but couldn't find out any code to create loop for my first page like WordPress my template has some php code log in-register -search and some other stuff , Now I really want to now which class in php is Appropriate to create loop in html based template? should I use database for it?
WordPress' loop is specific to that operating system. In this day and age I'd question why anyone starts a site without some sort of cms driving it. and yes, you'll need a database for your site, regardless of the approach. Your host will provide one free. What goes in it is up to you.
What I'll want to make is : using TinyMCE to edit content daily and make a post ,all my post sorted in first page with page navigation similar to Current cms's Wordpress-Joomla-Drupal . my client doesn't want to use any cms's so : How to make loop for content without using cms just with php snippets?
I think you need to dig deeper and find out what the objection is. Are they concerned it will be hard to use etc? Expensive? They need to realise that a custom built site is like reinventing the wheel and not cost effective - and they need to know that you might be the right guy for a CMS job but not for a coding-from-scratch job. Personally, any client who won't take basic technical advice is likely to be a nightmare on everything else.
Do You think make a loop with php is harder than Bicker with Consumer. there isn't any solution to me? Oh I started a hopeless task I don't think so, just need to php expert helps with max 30 line :if else if while end if
Not bicker, give professional advice. You don't have to take every job that comes your way. if the problem is really how to use tinymce then check their website for other implementation examples. a worthy alternative is ckeditor
If you don't know how to code a simple cms in your chosen web programming language why the hell are you selling your services to a customer? The approach is gonna be riddled with security holes, bad coding and potential problems. Most, if not all, of these would be negated if using something like WordPress or similar.
I'm not supposed to know everything , I can create WordPress theme and code editing .but the common problem is customer want's things which are challenge with border of your knowledge and it doesn't matter, We should learn solve their problems & Demands.We don't speak about My abilities...... How to make ...loop in a Section Just this, any videos or links and Tutorials can be worthy and Helpful
a loop goes something like this: $stmt = $dbh->prepare("SELECT * FROM cms_content WHERE <criteria goes here>"); if ($stmt->execute()) { while ($row = $stmt->fetch()) { $heading = $row['heading']; $article = $row['article']; echo '<h3>'.$heading.'</h3> <article>'.$article.'</article>'; } } else { //error-catching goes here } Code (markup): And that is basically it. Now, if that is beyond your comprehension, I still think you should do some reading up on PHP, because this is basic (really, really, REALLY basic stuff). I suggest codeacademy.com - they have a ver simple PHP-tutorial, which will give you some starting-points
Don't try to make a loop - it's an odd thing that only wordpress does. You are unlikely to find a tutorial on how to do it. I've implemented text editors in sites I've needed to put a backend onto and they're dead simple if you follow the examples. Edit: I've just seen @PoPSiCLe's response and he may be on the right track. I may have got distracted by the whole loop thing, when really it's just a while. However if you are editing a single page you should really be selecting just the one record - no while needed.
I was under the impression he wanted a way to fetch the posts written in the editor, not edit the actual posts, but I might be mistaken.