All Questions
1,353
questions
0
votes
0
answers
37
views
What's the best way to convert the html text to hypertext on Facebook API?
I'm using a rich text editor to create social media posts' text and I save it in DB as HTML to keep the format, I want to send these texts to Facebook Graph API formatted
for example:
// DB
<p>✨...
1
vote
2
answers
90
views
convert emoji short name to image using custom function
I have created a function that converts emoji short name to image but I am stuck how do i get emojis short names from a string so the function can convert those to emoji image .
$field_from_db = ':...
0
votes
0
answers
75
views
It is possible to retrieve only the text from a mail using Laravel?
I want to know if there is a way to retrieve the text from a mail using a function similar to mail->render. I want to retrieve the text without the html, in a way that the text has the same ...
1
vote
0
answers
68
views
using PHP's GD to create text with different colors for letters in same word
I am trying to create a PNG using PHP to create text with 2 separate colors. As you can see, $text = "bluewhite";. Currently I have the code to create the entire $text appear as white, but I ...
0
votes
1
answer
57
views
Centering text in odt files
I'm using odt file as a template for my transcripts and I'm using php to insert the transcript in the odt file which then outputs a correctly formated odt file but there is some text that I want to ...
0
votes
1
answer
77
views
PHP : Filter out text from HTML tags, process it and again place the text where it was (Drupal 9) [duplicate]
I have been trying to find a way to tackle below problem using PHP,
I have a HTML text from CKEditor, I want to replace certain words that I find match with, from a file and add a link to those words. ...
1
vote
1
answer
55
views
PHP: validate the lines of a "text" file while extracting some stats at the same time?
I have a file (from a POST request) that I would like to validate against some constraints:
All lines must be composed of ASCII printable characters only.
There must be at least one XYZ record (lines ...
1
vote
1
answer
52
views
Php Parse text to array with contain duplicate key
I want to parse text to array:
text delimited with =>
First is the key and last is the value
I will parse the text to an array. If a duplicate key is found, the value is an array with these keys. ...
-2
votes
3
answers
88
views
PHP count and seperate text from text file
Let's say inside the text file is this information:
<Amanda> Hi there, how are you?
<Jack> Hi, im fine
.
.
.
.
<Jack> see you later
I want to count the words each user have said ...
0
votes
1
answer
32
views
php two equaL columns from text in text file to image
<?php
//include new data
//require_once 'grab.php';
$filename = "result.txt";
function convert($path) {
$lines = file($path);
$newpath = substr($path, 0, -3) . 'png';
$im = ...
0
votes
1
answer
38
views
My module does not appear in the installed hooks
I have created a module to add an extra text for each product and that can be edited from the backoffice and its text saved in the database so that when it is updated it remains saved, etc.
The ...
0
votes
1
answer
135
views
Is there an function that compares two text files in PHP?
I need a function to compare two text files and find the similarities between them. I have tried using "Strpos" and "similartext", but neither of them seem not to working. I am not ...
0
votes
0
answers
125
views
PHP add text to the Imagick object, the text appears garbled, spaces and question marks appear
I am trying to add some text on an Imagick object,
but I am getting spaces and question marks.
$canvas = new Imagick("4093aeb.jpeg");
$canvas->setImageFormat('jpg');
$text = new ...
0
votes
2
answers
553
views
change color of a text in php with echo
I use Sambroadcaster
change color of a text in php with echo
this is the code:
<span id="currently-playing-title"><?php echo $currentSong->artist_title;; ?></span><?...
1
vote
1
answer
134
views
How do I read the last line to the first file in PHP?
I have it where it prints the file to the body but I need to do that but have the file's data load from the last line to the first.
The code I have right now
$file = fopen('text.txt','r');
while ($...