I am trying to build a budget lookup tool. I have form where someone enters an account#, fund#, and deptID#. When they hit search, it opens a modal and will display a table of the budget balances that match the entered fund, account, and deptID. I can get the modal to open but, I can’t seem to get the d…
Tag: php
PHP: Trying to insert dates in Database
I want to insert all the dates between a starting and an end date into a table in my database. I already found a code for the two dates and the dates between. The problem now is that the dates are not inserted into my database when running the code. Only 0000-00-00 is displayed in my date table. Also no
How to store some tags in Laravel and how can I technically store those tags using the same ID
My question is that is okay to do it ID or some integer in migrations and how to store multiple tags using the same ID in controllers? Storing like this (storing multiple tags on the same ID): ID TAG 1 LARAVEL 1 PHP Answer I’m not sure the reason why you want to save the tags with same id in
Follow Unfollow system
I am working on this site that follow and unfollow users just like Twitter follow. The query below works then I notice it doesn’t show me users I don’t follow because the user has been followed by somebody or is following somebody Below is my table structure In the user_follow_list Ben is followin…
PHP preg_split, split at | and check for minimum 3 chars
I want to separate at the “|” and check the length to at least 3 characters Can anybody help me? https://www.phpliveregex.com/p/AdQ Answer I think doing this in a regex might not be the best tool for the job, but if you want to use it here might be a possibility: https://regex101.com/r/Pz3YCH/1 Ag…
PHP check if value in array of objects exists more than once
I’ve this array here with multiple object: Now I need to know if there are any numbers that exists more than once. In this case its ABC. I’ve tried using array_sum and array_column but this seems to only work with numbers: Answer Use array_count_values() to count the repetitions. Then you can filt…
Using PHP preg_replace() with a string variable, where the variable needs to represent multiple permutations of itself
Using: I’d like to replace, case-insensitively, the text contained in $My_String, which I can achieve with: If $My_String is alpha beta gamma delta, this will identify: alPhA beTa GammA DeLta aLpHa bEta gAMma delTa etc. So far, so good. But any spaces and hyphens in $My_String must also be regarded as e…
Php multiple data insertion with textarea
I have 500+ user:pass and i want add all data with textarea. Example ; user:pass user:pass user:pass I use the following codes to add users individually ; How can I make this to add multiple data user = username : pass = password Thanks in advance. Answer you could use explode to split your string with a sepa…
INSERT INTO SELECT WITH DECLARING OTHER COLUMS VALUE
I just want to ask. what is the problem in here I just want to add some value to the the columns and get other value to the other table. I hope you can help me. I only have the problem in the first 4 value. -Thankyou. Answer
PHP WSDL response as object
I am sending a request for response to a WSDL in PHP (code below). The response is structured in a way that I’m not sure how to extract data from it. It comes back as an object with the XML inside. Is there a standard way of parsing the XML of this object? Here is my code: ?> Here is