Skip to main content

Questions tagged [php]

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

1vote
2answers
148views

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
3votes
1answer
46views

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
4votes
2answers
464views

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
3votes
1answer
54views

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
4votes
1answer
144views

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
5votes
1answer
543views

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
3votes
0answers
44views

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
4votes
1answer
130views

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
4votes
3answers
1kviews

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
1vote
0answers
41views

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
1vote
0answers
34views

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
3votes
1answer
76views

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
3votes
2answers
106views

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
4votes
4answers
182views

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
2votes
0answers
50views

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

153050per page
close