[Solved] PHP loop to echo certain div class on first round only

[ad_1] <?php $i=1; while ( $loop->have_posts() ) : $loop->the_post(); ?> <!– individual panel –> <div class=”panel panel-default”> <div class=”panel-heading”> <h4 class=”panel-title”> <a data-toggle=”collapse” data-parent=”#faqs” href=”#<?php the_ID(); ?>”> <?php the_title(); ?> </a> </h4> </div> <div id=”<?php the_ID(); ?>” class=”panel-collapse collapse <?php if ($i==1) { echo ‘in’; } ?>”> <div class=”panel-body”> <?php the_field(‘answer’); ?> </div> </div> </div> … Read more

[Solved] if imagesNamesList==[“None” for x in range(len(listOfImages)]: [closed]

[ad_1] You are missing a closing parenthesis: if imagesNamesList==[“None” for x in range(len(listOfImages))]: # here–^ However, you could write this code better (cleaner and more efficiently) like so: if imagesNamesList == [“None”]*len(listOfImages): Or, if your lists are huge, you can do as @mgilson noted: if all(x == “None” for x in imagesNamesList) and len(imagesNamesList) == … Read more

[Solved] Server to server transfer using AJAX

[ad_1] AJAX is generally used on the client side, not usually the server side. It sends requests to a server. You probably need to provide more information about what you are trying to achieve to get a decent answer. If you are wanting to transfer data from a “client” to a server then you could … Read more

[Solved] HTML textbox which takes multiple values by autofill like Facebook, Google+ etc [closed]

[ad_1] Using JQuery UI Autocomplete : Try this code Script $(function() { var availableTags = [ “ActionScript”, “AppleScript”, “Asp”, “BASIC”, “C”, “C++”, “Clojure”, “COBOL”, “ColdFusion”, “Erlang”, “Fortran”, “Groovy”, “Haskell”, “Java”, “JavaScript”, “Lisp”, “Perl”, “PHP”, “Python”, “Ruby”, “Scala”, “Scheme” ]; function split( val ) { return val.split( /,\s*/ ); } function extractLast( term ) { return … Read more

[Solved] Date range filter does not work [closed]

[ad_1] In the code you’ve provided I can see two issues: you are overwriting the data in $result in the second call to mysql_query() you are also looking for the current date (NOW()) to be between your constraints. Assuming that you’re using a DATE or DATETIME column in MySQL rather than a VARCHAR you can … Read more

[Solved] can i use where and order by in mysql together?

[ad_1] yes, this is valid as google will tell you http://dev.mysql.com/doc/refman/5.0/en/select.html For your actual error, from the php docs: For SELECT, SHOW, DESCRIBE, EXPLAIN and other statements returning resultset, mysql_query() returns a resource on success, or FALSE on error. // Perform Query $result = mysql_query($query); // Check result // This shows the actual query sent … Read more

[Solved] PHP Simple Form Validation

[ad_1] You have the following in your code: $name = $_POST[‘$name’]; $email = $_POST[‘$email’]; $dob = $_POST[‘$dob’]; You’re basically trying to access undefined indexes. Remove the extra $ from the key names: $name = $_POST[‘name’]; $email = $_POST[’email’]; $dob = $_POST[‘dob’]; Then, further below, you have some conditions like this: if(condition == true) { continue; … Read more

[Solved] incorrect if statement value returned [closed]

[ad_1] This condition will fail when it is 0: !empty ($_POST[‘interest’]) emtpy() will be true, so !empty() will be false. All posted values are strings, so to test for a 0 value, you could use for example $_POST[‘interest’] === ‘0’. However, that would of course fail for a string like ‘0.00’ 2 [ad_2] solved incorrect … Read more

[Solved] how to start creating game 2D for iOS [closed]

[ad_1] I recommend to you tutorial on http://www.raywenderlich.com , for example How To Make A Simple iPhone Game with Cocos2D 2.X Tutorial is good start. Using cocos2d-x will provide easy android porting. [ad_2] solved how to start creating game 2D for iOS [closed]

[Solved] Html file in ios [closed]

[ad_1] If you want to load a local HTML file within the app, then use the below code self.wView.dataDetectorTypes = UIDataDetectorTypeLink; NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:INDEX_PAGE ofType:@”html” inDirectory:DIRECTOY_PATH]]; //Directory Path Example: ipad/main/pages [self.wView loadRequest:[NSURLRequest requestWithURL:url]]; Put this code in your button handler method [ad_2] solved Html file in ios [closed]