yousrakasmi
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Error during displaying results in a table from the databaseI’m trying to get the values for one post but each post can have a multiple values of country, city, university, department, and year and when I leave some of them empty I get the error message
Warning: array_filter() expects parameter 1 to be array, string given
Warning: array_values() expects parameter 1 to be array, null givenin these lines (the empty column):
$line=array_filter($line[0]);
$line=array_values($line);So I think that the problem is with the for loop because I’ve just declared one variable in parameters
for($i=0;$i<count($co);$i++)
Can I replace this loop with another command to fill my table!
Many thanks linux4me2
Forum: Fixing WordPress
In reply to: Error during displaying results in a table from the databaseThank you linux4me2,
I think the problem is with the loop for($i=0;$i<count($ci);$i++) because I have 5 columns in my table
There is the full code to filled my table with the data
<table border="1"> <tr><th>Country</th><th>City</th><th>University</th><th>Department</th><th>Year</th></tr> <?php $co=get_post_meta(get_the_ID(), 'COUNTRY'); $co=array_filter($co[0]); $ci=get_post_meta(get_the_ID(), 'CITY'); $ci=array_filter($ci[0]); $un=get_post_meta(get_the_ID(), 'UNIVERSITY'); $un=array_filter($un[0]); $de=get_post_meta(get_the_ID(), 'DEPARTMENT'); $de=array_filter($de[0]); $ye=get_post_meta(get_the_ID(), 'YEARU'); $ye=array_filter($ye[0]); $ci=array_values($ci); $co=array_values($co); $un=array_values($un); $de=array_values($de); $ye=array_values($ye); for($i=0;$i<count($co);$i++) {?> <tr><td><?php echo load_by_id($co[$i],"country","country_id",$wpdb)->COUNTRY_NAME;?></td><td><?php echo load_by_id($ci[$i],"city","city_id",$wpdb)->CITY_NAME?></td><td><?php echo load_by_id($un[$i],"university_attributes","pk_i_id",$wpdb)->s_name?></td><td><?php echo load_by_id($de[$i],"department_attributes","pk_i_id",$wpdb)->s_name?></td><td><?php echo $ye[$i];?></td></tr> <?php }?> </table>
Any help will be appreciated, many thanks
Forum: Fixing WordPress
In reply to: It is possible to rename the option value 'Select Subcategory'?Thanks karpstrucking,
but I don’t know how can I use this function in my case!
Many thanks
Forum: Fixing WordPress
In reply to: display results in a table from the databaseMany thanks catacaustic,
Your suggestions have been very useful and now eveythign is working properly.
Thanks again.
Forum: Plugins
In reply to: New users don't receive automatic email with passwordmy domain is dondeals.com hosted by HostDime
Forum: Plugins
In reply to: New users don't receive automatic email with passwordThank You Postman SMTP
I’m creating an email account in my cPanel and sending mail from my own domain, but I don’t know how can I have an SPF record setup!
Thank you again for the help
Forum: Fixing WordPress
In reply to: How to fix 509 Bandwidth Limit ExceededThank you Jan Dembowski
I thought that there is a method to upgrade it into my cPanel or something, so I will contact them to resolve this problem.
Thanks anyway
Forum: Fixing WordPress
In reply to: How to fix the WordPress White ScreenOkey! Thank you for your time & your suggestions I appreciate it ??
Forum: Fixing WordPress
In reply to: How to fix the WordPress White ScreenI don’t have the .htaccess file in my server’s root folder in cpanel (public_html) can this file be a reason for this blank white screen?
Forum: Fixing WordPress
In reply to: How to generate .htaccess fileThanks Bill it’s work
Forum: Fixing WordPress
In reply to: How to fix the WordPress White ScreenWhen I try going directly to /wp-admin after the theme folder was renamed I put username and password then I get this message: “You do not have permission to access this page”.
I haven’t Twenty Fifteen theme in my folder I have: twentyfourteen, twentythirteen and twentytwelve.
I already rename the folders of plugins but it still didn’t work (same result).
Forum: Fixing WordPress
In reply to: How to fix the WordPress White ScreenWhen I rename my theme folder all I get is a blank white screen I can’t get into anywhere :/
Forum: Fixing WordPress
In reply to: How to fix the WordPress White ScreenI get the white screen after sign in I can’t get into the WP_Admin or my account such as a user
Forum: Fixing WordPress
In reply to: How to fix the WordPress White ScreenHi BlueKlip,
My website URL is dondeals.comI need to get into the WP-Admin
Thanks in advance…Forum: Fixing WordPress
In reply to: How to fix the WordPress White ScreenI don’t have any debug.log file inside my wp-content directory