PHP Multidimensional Arrays
Hello All, I have a piece of code that generates a multi-dimensional array from values in a database, but I'm wondering how I would search and add a new element to each parent: Array ( [52] =>...
View ArticleValdiation
Hi everyone, I am trying to have "require" label on form. If someone did not select the option on list, then "require" label will appear in form after submit. Seem my code isn't work. what did I do...
View ArticleRemove related element from multidimensional array
This is my array. It has stored images data. [other-image] => Array ( [img] => Array ( [0] => 1526973657.jpg [1] => 1526973661.jpg [2]...
View ArticleNot sure what to call this... (expertise needed)
I want to create a function that first reads a .txt file and creates arrays from repeating patterns inside of it. Let's pretend the file contains the following information (word for word). 1} ABC...
View ArticleUsing a service based on ID of record requested
My database schema has a supertype charts table and subtype tables for bar charts, pie charts, gauge charts, and line charts. Ajax requests are received just with a public ID which identifies a given...
View ArticleDisplay only the current user's details using PHP and MySQL
In this part of the code, both the score table and the profile page display everything I want, however, it is displaying EVERYBODIES details like First Name Surname Email Category Username, However, I...
View Articlesend email from database problem
I am having a LOOP problem but cannot seem to resolve it. Maybe some better skilled eyes can re-organize and remedy this. In its presented form, I receive 4 blank emails to 'myrealaddress@xyz.com'...
View Articlepreg_match question
$rows[0][2]->val = preg_match("/\b[0-9]{6,6}-[0-9]{4,4}\b/", $rows[0][2]->val) $rows[0][2]->val = preg_replace("/\b[0-9]{6,6}-[0-9]{4,4}\b/", "Match", $rows[0][2]->val); Hi there. First...
View ArticleFacebook API...
Hey guy's im going nuts here trying to figure out how to make this login work...lol! i get : Response Exception: Can't Load URL: The domain of this URL isn't included in the app's domains. To be able...
View ArticleType declarations for an array of objects
I have a class who's constructor must save an array of objects. One option is as follows: class Collections implements CollectionsInterface { protected $stack=[]; protected $nodeClass;...
View ArticleFilter array by KEY
I would like to create an array from the one below that can sort of filter using date ranges; For example, make an array that contains data using date <= 2018-05-09 without a loop. A loop is an...
View ArticleUp all night with DAYS
It all looked so simple on paper... But I'll skip the drama and get right to it: I'm posting $start and want to post $finish as a date that's 3 days afterwards Apparently, this is wrong somewhere:...
View ArticleAndroid file uploads
Hi I have some PHP to upload files in a webbrowser but it seems to do an odd thing. This problem could be with the php code or it could be an Android thing, I'm not sure. It is supposed to send a...
View ArticleInterfaces with type declaration
I am sure I am missing some big concept, and would appreciate some help. DogFactory::create() must be given a DogPrototype object and must return a Dog object, and similarity for...
View ArticlePHP file/page 404 error
Are there any people who can see why I get a 404 error on this page (console) https://skiersplanet.com/europe/austria/bad-gastein/ https://skiersplanet.com/google_in_skyresort.php?resortId=279...
View ArticleWhere to locate transactions
Previously, I've used them in the model/mapper (still a little fuzzy on the difference), but doing so reduce my ability to reuse code, so now I think it should be higher up at the service/controller....
View ArticleFORM not posting - help me, please
My form is not posting data to table. I removed all validation to simplification purposes, yet onSubmit only provides a blank page. I have used a script and verified connectivity to the db, and feel...
View Articletruncate text
Hi there, I'm trying to truncate some text by 15 words which is then followed by a "..." This is the line that outputs all the text: wpjm_the_job_description(); I've tried this, but nothing is...
View ArticleTransform sequential array to associated array with id/name elements
I need to provide a list of time zones which starts with a given string in id/name pairs, and came up with the following solution. public function timezones($param) { $timezone_identifiers...
View ArticleCan't escape this quote
Hi, I'm trying to escape the following: 'label' => __( 'Title <span class="tooltips" title="Give your title a catchy title, ideally starting with the word \"test"\> All it is...
View Article