Skip to main content

Questions tagged [php]

PHP is a widely-used, general-purpose scripting language that is especially suited for web development.

1 vote
2 answers
148 views

Convert binary string to text base64 [closed]

I have a dictionary with a lot of symbols, each of which is encoded in a huffman binary string. Example: Symbol Huffman Code you 010 shall 0111 not 00111 pass 00001 ... ... Therefore I encode the ...
Benzio's user avatar
  • 129
3 votes
1 answer
46 views

PHP script to generate named CSS grid areas

I wrote this PHP script to dynamically generate a topic header layout using CSS grid. The $columns array defines each column’s properties—like its CSS class, size, ...
live627's user avatar
  • 131
4 votes
2 answers
464 views

Improving upon the Security of my Export Remote Database to Local PHP API

I am working on an in-house application, and I am working on how our application communicates with our remote server. I have a PHP script that acts as an API to call to our MySQL DB and dump its ...
Cory Green's user avatar
3 votes
1 answer
54 views

Wordpress custom registration form with additional fields

I work on plugin for custom auth pages for WordPress and I try to create a custom registration form with additional fields. it has a shortcode in Beaver Builder. Is this the correct approach, and ...
Pavel Drow's user avatar
4 votes
1 answer
144 views

Replace node type in Drupal

In Drupal 11 or greater, this code is used to change the node type of a node. How would you improve the code if at all? ...
the_humble_asker's user avatar
5 votes
1 answer
543 views

User Management API

I got as task to build a simple Laravel API that should: 1 - Create User API 2 - Get Users API So I run the artisan command to ...
oderfla's user avatar
  • 235
3 votes
0 answers
44 views

SPA in Symfony UX Turbo

I am currently learning Symfony UX. My focus today was on UX Turbo. I basically wanted to create a very basic Single Page Application. User can 'login' using a form, submitting the form should render ...
O'Niel's user avatar
  • 349
4 votes
1 answer
130 views

Creating Dedicated Database for database test cases (Tests that I need to check the data are written or read sucessfully) in phpunit

I am making a base test class that bootstraps database Test cases ...
Dimitrios Desyllas's user avatar
4 votes
3 answers
1k views

A function to convert numbers from scientific notation to plain decimal

When PHP converts a number to string (for printing it out, for example), sometimes it may convert it to scientific notation out of nowhere (0.000021 for example). Or the number can be already in a ...
Your Common Sense's user avatar
1 vote
0 answers
41 views

Securely send data as a parameter in a Livewire action method

I have friendship functionality in my Laravel application and saw Crypt is available from within blade view templates. Is this a common practice when trying to send ...
JayDev95's user avatar
  • 111
1 vote
0 answers
34 views

Duplicating answers from a multi-section form populating multiple tables

I am implementing a system in which a client fills a form. Each form has multiple sections and each section populates multiple tables, thus user fills each section separately. I was asked to make a ...
Dimitrios Desyllas's user avatar
3 votes
1 answer
76 views

Rounding a decimal to the nearest (up or down) 50's integer

I need to round a decimal to the nearest 50's (please correct this phrase because I am not sure how it's called in English) For example: ...
pileup's user avatar
  • 461
3 votes
2 answers
106 views

Sending Firebase Cloud Messaging Notifications via FCM HTTP v1 API with PHP

This is my first time using FCM, and I had a lot of trouble finding up to date examples on how to send notifications using Firebase Cloud Messaging Notifications via FCM HTTP v1 API with PHP. I'd ...
tony's user avatar
  • 403
4 votes
4 answers
182 views

Reversing string in PHP

I got this task to evaluate my knowledges in PHP. I was asked to avoid using functions like strrev() or array_reverse(). ...
user avatar
2 votes
0 answers
50 views

Testing PHP CodeIgniter 3 controller with PHPUnit

I want to unit test my PHP website, which uses the outdated framework CodeIgniter 3. CodeIgniter 3 uses the MVC pattern, and each page on the website corresponds to a public method in a controller. I ...
RedDragonWebDesign's user avatar

15 30 50 per page
1
2 3 4 5
285